package com.neutech.entity;

import java.io.Serializable;
import java.util.Objects;

public class Sale implements Serializable {
    private Integer id;
    private String name;
    private Integer qty;

    @Override
    public String toString() {
        return "Sale{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", qty=" + qty +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Sale sale = (Sale) o;
        return id.equals(sale.id) &&
                name.equals(sale.name) &&
                qty.equals(sale.qty);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, qty);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getQty() {
        return qty;
    }

    public void setQty(Integer qty) {
        this.qty = qty;
    }

    public Sale(Integer id, String name, Integer qty) {
        this.id = id;
        this.name = name;
        this.qty = qty;
    }

    public Sale() {
    }
}
